package com.ruoyi.business.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.HurtPatientDoctorMapper;
import com.ruoyi.business.domain.HurtPatientDoctor;
import com.ruoyi.business.service.IHurtPatientDoctorService;

/**
 * 患者医师绑定Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-17
 */
@Service
public class HurtPatientDoctorServiceImpl implements IHurtPatientDoctorService
{
    @Autowired
    private HurtPatientDoctorMapper hurtPatientDoctorMapper;

    /**
     * 查询患者医师绑定
     *
     * @param patientId 患者医师绑定主键
     * @return 患者医师绑定
     */
    @Override
    public HurtPatientDoctor selectHurtPatientDoctorByPatientId(Long patientId)
    {
        return hurtPatientDoctorMapper.selectHurtPatientDoctorByPatientId(patientId);
    }

    /**
     * 查询患者医师绑定列表
     *
     * @param hurtPatientDoctor 患者医师绑定
     * @return 患者医师绑定
     */
    @Override
    public List<HurtPatientDoctor> selectHurtPatientDoctorList(HurtPatientDoctor hurtPatientDoctor)
    {
        return hurtPatientDoctorMapper.selectHurtPatientDoctorList(hurtPatientDoctor);
    }

    /**
     * 新增患者医师绑定
     *
     * @param hurtPatientDoctor 患者医师绑定
     * @return 结果
     */
    @Override
    public int insertHurtPatientDoctor(HurtPatientDoctor hurtPatientDoctor)
    {
        return hurtPatientDoctorMapper.insertHurtPatientDoctor(hurtPatientDoctor);
    }

    /**
     * 修改患者医师绑定
     *
     * @param hurtPatientDoctor 患者医师绑定
     * @return 结果
     */
    @Override
    public int updateHurtPatientDoctor(HurtPatientDoctor hurtPatientDoctor)
    {
        return hurtPatientDoctorMapper.updateHurtPatientDoctor(hurtPatientDoctor);
    }

    /**
     * 批量删除患者医师绑定
     *
     * @param patientIds 需要删除的患者医师绑定主键
     * @return 结果
     */
    @Override
    public int deleteHurtPatientDoctorByPatientIds(Long[] patientIds)
    {
        return hurtPatientDoctorMapper.deleteHurtPatientDoctorByPatientIds(patientIds);
    }

    /**
     * 删除患者医师绑定信息
     *
     * @param patientId 患者医师绑定主键
     * @return 结果
     */
    @Override
    public int deleteHurtPatientDoctorByPatientId(Long patientId)
    {
        return hurtPatientDoctorMapper.deleteHurtPatientDoctorByPatientId(patientId);
    }

    @Override
    public Map<String, Object> getBindDoctor(Long patientId) {
        return hurtPatientDoctorMapper.getBindDoctor(patientId);
    }

    @Override
    public List<Map<String, Object>> getBindPatient(Long doctorId) {
        return hurtPatientDoctorMapper.getBindPatient(doctorId);
    }
}
